package creational.factoryMethod.framework;

import java.util.Map;

public class Controller {
  public void renderView(String viewName, Map<String, Object> context) {
    ViewEngine viewEngine = getViewEngine();
    String html = viewEngine.render(viewName, context);
    System.out.println(html);
  }

  protected ViewEngine getViewEngine() {
    return new MyViewEngine();
  }
}
